<?php

use Illuminate\Database\Seeder;

class SysMenuSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //菜单分组数据
        $sql = <<<EOD
INSERT INTO `sys_menu_groups`(`group_id`, `group_key`, `group_name`, `deleted_at`, `created_at`, `updated_at`) VALUES (1, 'admin', '后台菜单', NULL, '2018-04-07 03:28:57', '2018-04-07 03:28:57');
INSERT INTO `sys_menu_groups`(`group_id`, `group_key`, `group_name`, `deleted_at`, `created_at`, `updated_at`) VALUES (2, 'home', '前台菜单', NULL, '2018-04-07 03:28:57', '2018-04-07 03:28:57');
EOD;
        DB::unprepared($sql);
        //菜单数据
        $sql = <<<EOD
INSERT INTO `sys_menus` VALUES (1, 1, '仪表盘', 0, '[]', 'fa fa-dashboard', 0, '', 0, NULL, '2018-04-13 02:35:33', '2018-04-13 02:35:33');
INSERT INTO `sys_menus` VALUES (2, 1, '系统管理', 0, '[]', 'fa fa-gear', 0, '', 99, NULL, '2018-04-13 02:35:33', '2019-02-25 06:14:41');
INSERT INTO `sys_menus` VALUES (4, 1, '系统信息', 3, '[]', 'fa fa-linux', 1, '', 2, NULL, '2018-04-13 02:35:33', '2018-04-13 02:35:33');
INSERT INTO `sys_menus` VALUES (5, 1, '控制面板', 8, '[]', 'fa fa-desktop', 1, '', 1, NULL, '2018-04-13 02:35:33', '2018-04-13 02:35:33');
INSERT INTO `sys_menus` VALUES (6, 1, '菜单分组', 6, '[]', 'icon iconfont icon-caidanfenzu', 2, '', 0, NULL, '2018-04-13 02:35:33', '2018-04-13 02:35:33');
INSERT INTO `sys_menus` VALUES (7, 1, '菜单管理', 21, '[]', 'icon iconfont icon-caidanguanli', 2, '', 1, NULL, '2018-04-13 02:35:33', '2018-04-13 02:35:33');
INSERT INTO `sys_menus` VALUES (8, 1, '权限管理', 13, '[]', 'icon iconfont icon-permissions', 2, '权限管理', 2, NULL, '2018-04-13 02:35:33', '2018-04-13 02:35:33');
INSERT INTO `sys_menus` VALUES (9, 1, '角色管理', 30, '[]', 'icon iconfont icon-role', 2, '', 3, NULL, '2018-04-13 02:35:33', '2018-04-13 02:35:33');
INSERT INTO `sys_menus` VALUES (10, 1, '用户管理', 39, '[]', 'icon iconfont icon-user', 2, '系统用户管理', 4, NULL, '2018-04-13 02:35:33', '2018-04-13 02:35:33');
INSERT INTO `sys_menus` VALUES (11, 1, '后台首页', 0, '[]', 'fa fa-home', 1, '后台首页', 0, NULL, '2018-04-13 02:35:33', '2018-04-13 02:35:33');
INSERT INTO `sys_menus` VALUES (12, 1, '文件管理', 49, '[]', 'icon iconfont icon-icon_file_fill', 0, '', 98, NULL, '2018-04-30 03:51:30', '2019-02-25 06:14:50');
INSERT INTO `sys_menus` VALUES (13, 1, '文件列表', 49, '[]', 'fa fa-file', 12, '', 0, NULL, '2018-04-30 03:52:23', '2018-04-30 03:52:23');
EOD;
        DB::unprepared($sql);
    }
}
